package com.futureweaver.controller;

import com.futureweaver.domain.CheckRequest;
import com.futureweaver.resposne.vo.CustomResponseEntity;
import com.futureweaver.service.CheckRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/check_request")
public class CheckRequestController {
    @Autowired
    private CheckRequestService service;

    @RequestMapping("/add")
    @ResponseBody
    public boolean add(@RequestBody CheckRequest checkRequest) {
        return service.add(checkRequest);
    }

    @RequestMapping("/update")
    @ResponseBody
    public boolean update(@RequestBody CheckRequest checkRequest) {
        return service.update(checkRequest);
    }

    @RequestMapping("/query")
    @ResponseBody
    public List<CheckRequest> query(@RequestBody Map<String, Object> vo) {
        return service.query(vo);
    }
}
